package com.example.classification;

import java.util.LinkedHashMap;
import java.util.Map;

import com.example.PaymentClassification;


public class CommissionedClassification  implements  PaymentClassification{
    private  double  salary;
    private final double commissionRate;
    private Map<String, SalesReceipt> SalesReceipts = new LinkedHashMap<>();

    public CommissionedClassification(double salary, double commissionRate) {
        this.salary  = salary;
        this.commissionRate = commissionRate;
    }

    public double getSalary() {
        return  salary;
    }

    public double getCommissionRate() {
        return  commissionRate;
    }

    public SalesReceipt getSalesReceiptOfDate(String date) {
        return SalesReceipts.get(date);
        
    }

    public void addSalesReceipt(SalesReceipt sr) {
       SalesReceipts.put(sr.getDate(), sr);
    }

}
